import React, { Component } from 'react'
import * as d3 from "d3";
export default class Circle extends Component {
    
    drawCircle=()=>{
        var svg = d3.select(".circle")
        svg.append("circle")
            .attr("cx", 200)
            .attr("cy", 300)
            .attr("r", 100)
            .attr("fill", "blue")
            .on("click", function () {
                d3.select(this)
                    .transition()
                    .duration(2000)
                    .attr("cx", 500)
                    .attr("r", 40)
                    .attr("fill", "yellow");
                console.log(d3.event);
            })
    }
    
    render() {
        return (
            <svg className="circle" width="960" height="600"></svg>
        )
    }
}
